<?php defined('IN_LK') or die('Access Denied');?>
<?php include self::admin_t('header', 'admin');?>

<ul class="main_nav">
  <li><a class="select" target="_self" href="?m=member&c=member&a=manage">会员管理</a></li>
  <li><a target="_self" href="javascript:void(0);" onclick="add_member()">添加会员</a></li>
</ul>
<div class="c"></div>
<div class="table-list">
<form action="?m=member&c=member_group&a=listorder" method="post">
<div class="table-list">
  <table width="100%" cellspacing="0">
    <thead>
      <tr>
        <th width="40"><input type="checkbox" name="lid" id="lid" onclick="select_all(this.id, 'listorder[]')" value="" /></th>
        <th align="left" width="60">UID</th>
        <th align="left" width="80">用户名</th>
        <th align="left" width="120">昵称</th>
        <th align="left" width="">邮箱</th>
        <th align="left" width="120">注册ip</th>
        <th width="180">最后登录</th>
        <th align="left" width="">积分</th>
        <th width="80">操作</th>
      </tr>
    </thead>
    <tbody>
    <?php
	if($members)
	{
		foreach($members as $member)
		{
	?>
    	<tr>
        	<td align="center"><input type="checkbox" name="listorder[]" value="<?php echo $member['userid'];?>" /></td>
        	<td><?php echo $member['userid'];?></td>
        	<td><?php echo $member['username'];?></td>
        	<td><?php echo $member['nickname'];?></td>
        	<td><?php echo $member['email'];?></td>
        	<td><?php echo $member['regip'];?></td>
        	<td align="center"><?php echo date('Y-m-d H:i:s', $member['lastlogintime']);?></td>
            <td><?php echo $member['point'];?></td>
        	<td align="center"><a href="#">[编辑]</a></td>
        </tr>
	<?php
		}
	}else{
	?>
      <tr>
      	<td colspan="9" align="center">暂无数据</td>
      </tr>
     <?php }?>
    </tbody>
  </table>
  </div>
  <div class="bot"></div><?php echo $page_nav;?>
</form>
</div>
<?php include self::admin_t('footer', 'admin');?>
<script type="text/javascript">
function add_member()
{
	var url = '?m=member&c=member&a=add';
	window.top.art.dialog(
	{
		title : '添加会员',
		iframe: url,
		width : 700,
		height: 400,
		id    : 'add_member'
	},
	function ()
	{
		var d    = window.top.art.dialog({id:'add_member'}).data.iframe;
		var form = d.document.getElementById('dosubmit');
		form.click();
		return false;
	},
	function ()
	{
		window.top.art.dialog({id:'add_member'}).close();
	});
}
function edit(id, name)
{
	var url = '?m=member&c=member_group&a=edit&groupid=' + id;
	window.top.art.dialog(
	{
		title  :'编辑 - ' + name,
		iframe : url,
		width  :700,
		height : 500,
		id     : 'edit'
	},
	function()
	{
		var d    = window.top.art.dialog({id:'edit'}).data.iframe;
		var form = d.document.getElementById('dosubmit');
		form.click();
		return false;
	},
	function ()
	{
		window.top.art.dialog({id:'edit'}).close();
	});
}
</script>